const AsideDrawer = defineComponent({
  setup(props, {slots}) {
    const drawerVisible = ref(false)
    const drawerClose = (e: any) => {
      console.log(e)
      drawerVisible.value = false
    }
    const handle_open_drawer = () => {
      drawerVisible.value = true
    }
    return () => (
      <div class="2xl:hidden z-10 fixed bottom-1/12 right-1/12  rounded-full overflow-hidden">
        <i
          class="bg-black w-12 h-12 iconfont icon-LH text-white text-2xl grid grid-cols-1 place-items-center cursor-pointer"
          onClick={handle_open_drawer}
        ></i>
        <a-drawer
          width="auto"
          title="侧边栏"
          placement="left"
          visible={drawerVisible.value}
          onClose={drawerClose}
          bodyStyle={{margin: 0, padding: 0}}
        >
          <div class="w-mainViewLeft h-full flex">{slots.default?.()}</div>
        </a-drawer>
      </div>
    )
  },
})

export default AsideDrawer
